<!-- Author: https://www.facebook.com/francefu -->
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<script>
function SendCommand()
{
document.getElementById("Send").disabled=true;
var url=document.getElementById("url").value;
if (document.getElementById("choice1").checked)
    var cmd=document.getElementById("cmd1").value;
else
    var cmd=document.getElementById("cmd2").value;
var P1=document.getElementById("P1").value;
var P2=document.getElementById("P2").value;
var P3=document.getElementById("P3").value;
var P4=document.getElementById("P4").value;
var P5=document.getElementById("P5").value;
var P6=document.getElementById("P6").value;
var P7=document.getElementById("P7").value;
var P8=document.getElementById("P8").value;
var P9=document.getElementById("P9").value;
var link=url+"?"+cmd+"="+P1+";"+P2+";"+P3+";"+P4+";"+P5+";"+P6+";"+P7+";"+P8+";"+P9;
document.getElementById("ShowUrl").innerHTML="<font color=red>URL："+link+"</font>";
document.getElementById("MyFirmata").src=link;
setTimeout(wait,1000);
}
function wait()
{
    document.getElementById("Send").disabled=false;
}
</script>
<body>

<form onreset="document.getElementById('MyFirmata').src='about:blank';">
<table>
 <tr>
  <td valign="top">
   <table width="350px">
    <tr><td>ESP01(+Arduino Leonardo), ESP12E, ESP32, WebBit, LinkIt7697, ESP32-CAM</td></tr>
    <tr><td>IP：<input type="text" name="url" id="url" size="26" value="http://192.168.4.1"></td></tr>
    <tr><td>Command</td></tr>
    <tr>
    <td>
    <input type="radio" name="choice" id="choice1" checked>
    <select name="cmd1" id="cmd1">
    <option value="ip">ip</option>
    <option value="mac">mac</option>
    <option value="restart">restart</option>
    <option value="resetwifi">resetwifi(ssid,password)</option>
    <option value="at">at</option>
    <option value="inputpullup">inputpullup</option>
    <option value="pinmode">pinmode</option>
    <option value="digitalwrite">digitalwrite(gpio,value)</option>
    <option value="analogwrite">analogwrite(gpio,value)</option>
    <option value="digitalread">digitalread(gpio)</option>
    <option value="analogread">analogread(gpio)</option>
    <option value="touchread">touchread(gpio) for ESP32</option>
    <option value="tcp">tcp(domain,port,request,wait)</option>
    <option value="ifttt">ifttt(event,key,value1,value2,value3)</option>
    <option value="thingspeakupdate">thingspeakupdate(key,field1~field8)</option>
    <option value="thingspeakread">thingspeakread(request)</option>
    <option value="linenotify">linenotify(token,request)</option>
    <option value="car">car(L1,L2,R1,R2,Lspeed,Rspeed,Delay,state)</option>
    <option value="i2cLcd">i2cLcd(address,gpioSDA,gpioSCL,text1,text2)</option>
    <option value="i2cLcd">i2cLcd(address,text1,text2)</option>        
    <option value="led">led(0~24,rrggbb) for WebBit</option>
    <option value="matrixled">matrixled(rrggbbrrggbb......) for WebBit</option>
    <option value="brightness">brightness(0~1) for WebBit</option>        
    <option value="buzzer">buzzer(frequency,delay) for WebBit</option>
    <option value="buttonA">buttonA for WebBit</option>
    <option value="buttonB">buttonB for WebBit</option>
    <option value="buttonAB">buttonAB for WebBit</option>
    <option value="temperature">temperature for WebBit</option>
    <option value="lumL">lumL for WebBit</option> 
    <option value="lumR">lumR for WebBit</option>  
    <option value="MPU9250">MPU9250 for WebBit</option>
    <option value="accel">Accelerometer for WebBit</option>
    <option value="gyro">Gyroscope for WebBit</option> 
    <option value="mag">Magnetic for WebBit</option>  
    <option value="mousemove">mousemove For Leonardo</option>
    <option value="mouseclickleft">mouseclickleft For Leonardo</option>
    <option value="mouseclickright">mouseclickright For Leonardo</option>
    <option value="mouseclickmiddle">mouseclickmiddle For Leonardo</option>
    <option value="mousepressleft">mousepressleft For Leonardo</option>
    <option value="mousepressright">mousepressright For Leonardo</option>
    <option value="mousepressmiddle">mousepressmiddle For Leonardo</option>
    <option value="mouserelease">mouserelease For Leonardo</option>
    <option value="keyboardpress">keyboardpress For Leonardo</option>
    <option value="keyboardprint">keyboardprint For Leonardo</option>
    <option value="keyboardprintln">keyboardprintln For Leonardo</option>
    <option value="keyboardwrite">keyboardwrite For Leonardo</option>
    <option value="flash">flash(value) For ESP32-CAM</option>
    <option value="servo">servo(value) For ESP32-CAM</option>
    <option value="servo1">servo1(value) For ESP32-CAM</option>
    <option value="servo2">servo2(value) For ESP32-CAM</option>
    <option value="speedL">speedL(value) For ESP32-CAM</option>
    <option value="speedR">speedR(value) For ESP32-CAM</option>
    <option value="decelerate">decelerate(value) For ESP32-CAM</option>
    <option value="car">car(state) For ESP32-CAM</option>
    <option value="getstill">getstill For ESP32-CAM</option>
    <option value="framesize">framesize(size) For ESP32-CAM</option>         
    <option value="sendCapturedImageToLineNotify">sendCapturedImageToLineNotify(token) For ESP32-CAM</option>        
    </select>
    <br>
    <input type="radio" name="choice" id="choice2">
    <input type="text" name="cmd2" id="cmd2" size="23">
    </td>
    </tr>
    <tr>
    <td>P1：<input type="text" name="P1" id="P1" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P2：<input type="text" name="P2" id="P2" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P3：<input type="text" name="P3" id="P3" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P4：<input type="text" name="P4" id="P4" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P5：<input type="text" name="P5" id="P5" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P6：<input type="text" name="P6" id="P6" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P7：<input type="text" name="P7" id="P7" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P8：<input type="text" name="P8" id="P8" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td>P9：<input type="text" name="P9" id="P9" size="30" onclick="this.select()"></td>
    </tr>
    <tr>
    <td align="center"><input type="reset" value="Clear" height="50">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="Send" value="Send" onclick="SendCommand();">&nbsp;&nbsp;&nbsp;</td>
    </tr>
   </table><br>
  </td>
  <td valign="top">
   <iframe id="MyFirmata" width="270" height="320"></iframe><br>
   Command Format：<br>
   http://APIP/?cmd=P1;P2;P3;P4;P5;P6;;P7;P8;P9<br>
   http://STAIP/?cmd=P1;P2;P3;P4;P5;P6;P7;P8;P9
  </td>
 </tr>
</table>
</form>
<div id="ShowUrl"></div>
</body>
</html>
